SHELL = /bin/sh

CXX_SOURCES = llt_print_tcp.cc llt_printer.cc 
GEN_SOURCES = llt_print_tcp.hh llt_printer.hh llt_print_tcp_gen.cc

PPF_SOURCES = printer.lp
MAIN_SOURCE = print_tcp.lp
ALL_SOURCES = $(PPF_SOURCES) $(MAIN_SOURCE) 

.SUFFIXES:
.SUFFIXES: .lp .cc .hh .o .lapp

TARGET_NAME = print_tcp.lapp

LLT_ACTION = llt print_tcp.lp

$(TARGET_NAME) : $(GEN_SOURCES) $(CXX_SOURCES)
	lpkg $(subst .lp,,$(ALL_SOURCES))

llt_print_tcp.hh : print_tcp.lp
	$(LLT_ACTION)

llt_print_tcp_gen.cc : print_tcp.lp
	$(LLT_ACTION)

llt_myPpf.hh : myPpf.lp
	$(LLT_ACTION)

llt_printer.hh : printer.lp
	$(LLT_ACTION)

llt_highFilter.hh : highFilter.lp
	$(LLT_ACTION)

.PHONY: clean all

all : $(TARGET_NAME)

clean :
	rm -rf *.lapp *.o $(GEN_SOURCES)
